<? global $cat, $cat1, $cat2, $lg, $products, $FullUrl; ?>
<?
	echo '123';
?>
<? if (count($products)>0) { ?>
<div class="centerColumn" id="allProductsDefault">
  <h1 id="allProductsDefaultHeading">All Products</h1>
  <div id="sorter">
    <label for="disp-order-sorter">Sort by: </label>
    <form name="sorter_form" action="http://osc.template-help.com/zencart_27053/index.php?main_page=products_all" method="get">
      <input name="main_page" value="products_all" type="hidden">
      <select name="disp_order" onchange="this.form.submit();" id="disp-order-sorter">
        <option value="1" selected="selected">Product Name</option>
        <option value="2">Product Name - desc</option>
        <option value="3">Price - low to high</option>
        <option value="4">Price - high to low</option>
        <option value="5">Model</option>
        <option value="6">Date Added - New to Old</option>
        <option value="7">Date Added - Old to New</option>
      </select>
    </form>
  </div>
  <br class="clearBoth">
  <br class="clearBoth">
  <br class="clearBoth">
  <table width="100%" border="0" cellpadding="2" cellspacing="2">
    <tbody>
    	<? for ($i=0; $i<count($products); $i++) { 
	  		$pro = $products[$i];
			$img = GetImage($pro['img']);
			$link = GetProductLinkFull($pro, $lg);
			$pro_name = $pro["name_$lg"];
			$pro_desc = $pro["descs_$lg"];
			$code = $pro["code"];
			$price = $pro["price"];
			$size = $pro["size"];
	  ?>
      <tr>
        <td colspan="3"><hr></td>
      </tr>
      <tr class="productListing-odd">
        <td class="main" valign="top" width="40%" align="center"><a class="name" href="<?=$link?>"><img src="<?=$FullUrl.'/'.$img?>" alt.="Product #001" title=" Product #001 " height="130" width="199"></a><br clear="all">          
          <br clear="all"></td>
        <td colspan="2" class="main" valign="top"><a class="name" href="<?=$link?>"><strong><?=$pro_name?></strong></a><br clear="all">
          <br clear="all">
          Mã Sản phẩm: <?=$code?><br clear="all">
          Giá: <span class="price"><?=$price?> VNĐ</span><br clear="all">
          Kích thước: <?=$size?><br clear="all">
          <br clear="all">
          <a href="#" onclick="location.href='<?php echo $FullUrl; ?>/index.php?do=cart&act=add&id=<?=$pro['id']; ?>&lg=<?=$lg?>&sl=1'"><img src="<?=$FullUrl?>/images/button_buy_now.gif" alt="Buy Now" title=" Buy Now " height="20" width="63"></a>&nbsp;<br>
          <br clear="all"></td>
      </tr>
      <tr class="productListing-odd">
        <td colspan="3" class="main" valign="top"><a href="<?=$link?>"> ... Xem chi tiết</a></td>
      </tr>      
      <?
		}
	  ?>
      <tr>
        <td colspan="3"><hr></td>
      </tr>      
    </tbody>
  </table>  
  <br class="clearBoth">
</div>
<div class="clear"></div>
<? }?>
